src/Model/Media/Attachment.php
final public static function load(&$object, &$params) {
        //Relaod the object
        $attachments = static::getInstance();
        $attachment = & $object;
        //if is object $object
        if (!is_a($attachment, Entity::class)) {
            //Attempt to determine what type of object this is or throw an error
            $attachment = $attachments->loadObjectByURI($attachment);
            //Make sure its an object;
        }

        if ($attachment->getObjectType() !== "attachment")
            return false; //we only deal with attachments, let others deal withit

        $fileId   = $attachment->getObjectType();
        $filePath = FSPATH . DS . $attachment->getPropertyValue("attachment_src");
        $contentType = $attachment->getPropertyValue("attachment_type");

        static::place($fileId, $filePath, $contentType, $params);
    }
final public static function load(&$object, &$params) {
        //Relaod the object
        $attachments = static::getInstance();
        $attachment = & $object;
        //if is object $object
        if (!is_a($attachment, Entity::class)) {
            //Attempt to determine what type of object this is or throw an error
            $attachment = $attachments->loadObjectByURI($attachment);
            //Make sure its an object;
        }

        if ($attachment->getObjectType() !== "attachment")
            return false; //we only deal with attachments, let others deal withit

        $fileId   = $attachment->getObjectType();
        $filePath = FSPATH . DS . $attachment->getPropertyValue("attachment_src");
        $contentType = $attachment->getPropertyValue("attachment_type");

        static::place($fileId, $filePath, $contentType, $params);
    }
Displays an attachment

@param type $object
@param type $params