Finds a Picture/s for the given object type / object id.

@param $object_type
@param $object_id

@return mixed
506800
public function findObjectPics($object_type, $object_id)
    {
        $query = $this->db()->createQueryBuilder();
        return $query->select('*')
            ->from($this->table, 'p')
            ->where('p.object_type = ?')
            ->andWhere(('p.object_id = ?'))
            ->setParameter(0, $object_type)
            ->setParameter(1, $object_id)
            ->execute();
    }
948122
protected function check_object_id( $object_id ) {
		$term = get_term( $object_id );
		if ( ! $term ) {
			WP_CLI::error( "Could not find the term with ID {$object_id}." );
		}
		return $term->term_id;
	}
485841
protected function check_object_id( $object_id ) {
		$fetcher = new SiteFetcher();
		$site    = $fetcher->get_check( $object_id );
		return $site->blog_id;
	}
1301692
final public function getObjectsListCount($objectType, $properties = array(), $objectURI = NULL, $objectId = NULL)
    {
        if (empty($properties)):
            if (!empty($this->propertyModel))
                $properties = array_keys($this->propertyModel);
        endif;
        $query = $this->getObjectCountQuery($properties, "?{$this->valueGroup}property_values", $objectId, $objectType, $objectURI);
        //echo($this->withConditions) ;
        $query .= "\nGROUP BY o.object_id";
        $query .= $this->getListLookUpConditionsClause();
        $query .= $this->getListOrderByStatement();
        $cquery = "SELECT COUNT(total_objects) as count FROM ($query) AS total_entities";
        $results = $this->database->prepare($cquery)->execute();
        $count = 0;
        while ($row = $results->fetchAssoc()) {
            $count = $row['count'];
        }
        return $count;
    }
79264
public static function getNote(int $object_id, int $note_id): Builder
    {

        return Note::where('object_type', __CLASS__)
            ->where('object_id', $object_id)
            ->where('id', $note_id);

    }
160458
public function get($object_id = 0, $where = '')
	{
		return new Record($object_id, $this->db, $this->table, $this->primary, $where, $this->select);
	}
174485
protected function check_object_id( $object_id ) {
		$fetcher = new PostFetcher();
		$post    = $fetcher->get_check( $object_id );
		return $post->ID;
	}
1365799
public function add(string $id_option, string $type = 'page'): ?int
  {
    if ( $id_option = $this->_get_id_option($id_option, $type) ){
      return $this->pref->set_by_option($id_option, []);
    }
    return null;
  }
843819
public function readOne($objectType) {
        $result = $this->api->request(
            'cmdb.object_types',
            [
                'filter' => [
                    'id' => $objectType
                ],
                'countobjects' => true
            ]
        );

        return end($result);
    }
134150
public function getDb($db_type, $node_type)
    {
        if ($this->isSingle()) {
            switch ($db_type) {
            case Connection::DB_TYPE:
                switch ($node_type) {
                case 'master':
                    return Connection::component()->write_conn;
                case 'slave':
                    return Connection::component()->read_conn;
                default:
                    return Connection::component()->write_conn;
                }
                case \lb\components\db\mongodb\Connection::DB_TYPE :
                return \lb\components\db\mongodb\Connection::component()->_conn;
            default:
                return false;
            }
        }
        return false;
    }
47483
public static function getOsimages($type = null)
    {
        return Yii::$app->cache->getOrSet([__METHOD__, $type], function () use ($type) {
            return Osimage::find()->andFilterWhere(['type' => $type])->all();
        }, 3600);
    }
367190
public static function getTypeFromPath($file_name){
		$ext = strtolower(preg_replace('/^.*\.([^.]+)$/', '$1', $file_name));
		switch( $ext ){
			case 'jpeg':
			case 'jpg':
				return self::JPEG;
				break;
			case 'otf':
				return self::OpenType;
				break;
			case 'opf':
				return self::OPF2;
				break;
			case 'smil':
				return self::MediaOverlays301;
				break;
			case 'js':
				return self::JS;
				break;
			default:
				$const_name = strtoupper($ext);
				$refl = new \ReflectionClass(get_called_class());
				return $refl->getConstant($const_name);
				break;
		}
	}
584791
public function getEmptyObjectStructureFromConfig($config, $result_type = 'object')
  {
    $value = $this->createEmptyObjectStructure($config);
    $value = $this->converter->convertTo($value, $result_type);

    return $value;
  }
931858
public static function object($objectType)
    {
        //====================================================================//
        // First Access to Local Objects
        if (!isset(self::core()->objects)) {
            //====================================================================//
            // Initialize Local Objects Class Array
            self::core()->objects = array();
        }

        //====================================================================//
        // Check in Cache
        if (array_key_exists($objectType, self::core()->objects)) {
            return self::core()->objects[$objectType];
        }

        //====================================================================//
        // Verify if Object Class is Valid
        if (!self::validate()->isValidObject($objectType)) {
            throw new Exception('You requested access to an Invalid Object Type : '.$objectType);
        }

        //====================================================================//
        // Check if Object Manager is Overriden
        if (self::local() instanceof ObjectsProviderInterface) {
            //====================================================================//
            // Initialize Local Object Manager
            self::core()->objects[$objectType] = self::local()->object($objectType);
        } else {
            //====================================================================//
            // Initialize Standard Class
            $className = SPLASH_CLASS_PREFIX.'\\Objects\\'.$objectType;
            self::core()->objects[$objectType] = new $className();
        }

        //====================================================================//
        //  Load Translation File
        self::translator()->load('objects');

        return self::core()->objects[$objectType];
    }
165470
public static function getByIdType($id, $type)
    {
        $o = self::factory($type);
		$o->load($id);
        return $o;
    }
220361
function o_image($id,$action,$options=''){
    if ($action!='new'){
        $o =& $this->objects[$id];
    }
    switch($action){
        case 'new':
        // make the new object
        $this->objects[$id]=array('t'=>'image','data'=>$options['data'],'info'=>array());
        $this->objects[$id]['info']['Type']='/XObject';
        $this->objects[$id]['info']['Subtype']='/Image';
        $this->objects[$id]['info']['Width']=$options['iw'];
        $this->objects[$id]['info']['Height']=$options['ih'];
        if (!isset($options['type']) || $options['type']=='jpg'){
        if (!isset($options['channels'])){
            $options['channels']=3;
        }
        switch($options['channels']){
            case 1:
            $this->objects[$id]['info']['ColorSpace']='/DeviceGray';
            break;
            default:
            $this->objects[$id]['info']['ColorSpace']='/DeviceRGB';
            break;
        }
        $this->objects[$id]['info']['Filter']='/DCTDecode';
        $this->objects[$id]['info']['BitsPerComponent']=8;
        } else if ($options['type']=='png'){
        $this->objects[$id]['info']['Filter']='/FlateDecode';
        $this->objects[$id]['info']['DecodeParms']='<< /Predictor 15 /Colors '.$options['ncolor'].' /Columns '.$options['iw'].' /BitsPerComponent '.$options['bitsPerComponent'].'>>';
        if (strlen($options['pdata'])){
            $tmp = ' [ /Indexed /DeviceCMYK '.(strlen($options['pdata'])/3-1).' ';
            $this->numObj++;
            $this->o_contents($this->numObj,'new');
            $this->objects[$this->numObj]['c']=$options['pdata'];
            $tmp.=$this->numObj.' 0 R';
            $tmp .=' ]';
            $this->objects[$id]['info']['ColorSpace'] = $tmp;
            if (isset($options['transparency'])){
            switch($options['transparency']['type']){
                case 'indexed':
                $tmp=' [ '.$options['transparency']['data'].' '.$options['transparency']['data'].'] ';
                $this->objects[$id]['info']['Mask'] = $tmp;
                break;
            }
            }
        } else {
            $this->objects[$id]['info']['ColorSpace']='/'.$options['color'];
        }
        $this->objects[$id]['info']['BitsPerComponent']=$options['bitsPerComponent'];
        }
        // assign it a place in the named resource dictionary as an external object, according to
        // the label passed in with it.
        $this->o_pages($this->currentNode,'xObject',array('label'=>$options['label'],'objNum'=>$id));
        // also make sure that we have the right procset object for it.
        $this->o_procset($this->procsetObjectId,'add','ImageC');
        break;
        case 'out':
        $tmp=$o['data'];
        $res= "\n".$id." 0 obj\n<<";
        foreach($o['info'] as $k=>$v){
        $res.="\n/".$k.' '.$v;
        }
        if ($this->encrypted){
        $this->encryptInit($id);
        $tmp = $this->ARC4($tmp);
        }
        $res.="\n/Length ".strlen($tmp)." >>\nstream\n".$tmp."\nendstream\nendobj\n";
        return $res;
        break;
    }
    }
19280
public function describe($object_name = null, $options = [])
    {
        $url = sprintf('%s/sobjects', $this->getBaseUrl());
        
        if ( ! empty($object_name)) {
            $url .= sprintf('/%s/describe', $object_name);
        }

        return $this->request($url, $options);
    }