@param int $id
@param bool $is_valid

@return array|false
548840
public function get_data( $id, $is_valid = true ) {
		$table = $this->get_related_table_name();
		$data  = $this->app->db->select_row( $table, [
			'id' => $id,
		] );
		if ( empty( $data ) ) {
			return false;
		}
		$post_id = $data['post_id'];
		$post    = get_post( $post_id );
		if ( empty( $post ) || $post->post_type != $this->get_post_type() || ( $is_valid && $post->post_status !== 'publish' ) ) {
			return false;
		}

		return $this->filter_item( $this->set_post_data( $data, $post ) );
	}
1063719
public function findById($id)
    {
        $result = array();
        $relations = $this->getRelations();

        $items = $relations[RelationBuilder::TREE_PARAM_ITEMS];

        if (isset($items[$id])) {
            return $items[$id];
        } else {
            return false;
        }
    }
1354529
public function getRightsValues($id, $isRole = false)
    {
        $translator = $this->serviceLocator->get('translator');
        /** @var \MelisCore\Service\MelisCoreUserService $melisCoreUser */
        $melisCoreUser = $this->getServiceLocator()->get('MelisCoreUser');
        if (!$isRole) {

            $xml = $melisCoreUser->getUserXmlRights($id);
        } else {
            $xml = '';
            $tableUserRole = $this->serviceLocator->get('MelisCoreTableUserRole');
            $datasRole = $tableUserRole->getEntryById($id);
            if ($datasRole) {
                $datasRole = $datasRole->current();
                if (!empty($datasRole)) {
                    $xml = $datasRole->urole_rights;
                }
            }
        }

        $selectedRootInterface = $melisCoreUser->isItemRightChecked($xml, self::MELISCORE_PREFIX_INTERFACE, self::MELISCORE_PREFIX_INTERFACE . '_root');
        $selectedRootTools = $melisCoreUser->isItemRightChecked($xml, self::MELIS_PLATFORM_TOOLS_PREFIX, self::MELIS_PLATFORM_TOOLS_PREFIX . '_root');

        $rightsItems = [
            [
                'key' => self::MELISCORE_PREFIX_INTERFACE . '_root',
                'title' => $translator->translate('tr_meliscore_rights_Interface exclusion'),
                'lazy' => false,
                'selected' => $selectedRootInterface,
                'iconTab' => '',
                'melisData' => [
                    'colorSelected' => '#CB4040',
                ],
            ],
            [
                'key' => self::MELIS_PLATFORM_TOOLS_PREFIX . '_root',
                'title' => $translator->translate('tr_meliscore_rights_Tools'),
                'lazy' => false,
                'selected' => $selectedRootTools,
                'iconTab' => '',
                'melisData' => [
                    'colorSelected' => '#99C975',
                ],
            ],
        ];

        // interface rights
        $interfaceItems = [];
        $config = $this->getServiceLocator()->get('config');
        foreach ($config['plugins'] as $pluginName => $plugin) {
            $child = $this->getInterfaceKeysRecursive('/' . $pluginName, $xml);
            if ($child) {
                $interfaceItems[] = $child;
            }
        }
        $rightsItems[0]['children'] = $interfaceItems;


        // tools rights
        $toolsItems = $this->getToolsKeys($xml);
        $rightsItems[1]['children'] = $toolsItems;

        // Return values
        return $rightsItems;
    }
844256
public function load($id = null)
    {
        if (!is_null($id)) {
            $this->setId($id);
        }

        $this->isLoaded = false;
        $data = $this->getDbGateway()->load($this->getId());
        if ($data) {
            $this->setData($data);
            $this->isLoaded = true;
        }

        return $this->isLoaded();
    }
1356521
public function __isset($id) {
		if ($this->has($id)) {
			return true;
		}
		
		if ($this->hasLocator()) {
			$locator = $this->getLocator();
			
			if ($locator->has($id)) {
				return true;
			}
		}
		
		return false;
	}
53806
public function load($id)
    {
        $this->checkDB();
        $row = $this->loadInternal($id);

        if ($row === null) {
            return false;
        }

        $this->initFromRow($row);
        $this->generatePropertyHashes();
        return true;
    }
1273402
protected function validateIds( array $ids )
	{
		$list = [];

		foreach( $ids as $id )
		{
			if( $id != '' && preg_match( '/^[A-Za-z0-9\-\_]+$/', $id ) === 1 ) {
				$list[] = (string) $id;
			}
		}

		return $list;
	}
71228
public function supports($id, $definition)
    {
        if (is_string($definition) && '@' == substr($definition, 0, 1)) {
            return false;
        }
        return is_scalar($definition) ||
               is_array($definition) ||
               (is_object($definition) && !is_callable($definition));
    }
1206683
private function validateId(string $id)
    {
        if (!interface_exists($id) && !class_exists($id)) {
            throw new InvalidArgumentException(
                sprintf('Invalid service id "%s". Service id must be an existing interface or class name.', $id)
            );
        }
    }
1236774
public function isValid($id)
    {
        $ttl = $this->hasOption(self::OPTION_TTL) ? $this->getOption(self::OPTION_TTL) : self::DEFAULT_TTL;
        if ($this->getPersistence()->supportsFeature(\common_persistence_KeyValuePersistence::FEATURE_NX)) {
            return $this->getPersistence()->set(self::PREFIX.$id, 't', $ttl, true);
        } else {
            if ($this->getPersistence()->exists(self::PREFIX.$id)) {
                return false;
            }
            return $this->getPersistence()->set(self::PREFIX.$id, 't', $ttl);
        }
    }
1013343
public function remove($id)
    {
        $file = $this->_file($id);
        $boolRemove   = $this->_remove($file);
        $boolMetadata = $this->_delMetadatas($id);
        return $boolMetadata && $boolRemove;
    }
1221800
public function isPost($id=false,$filter=null,$filterOptions=array())
		{
			if(!$id)
			{
				return (isset($_SERVER['REQUEST_METHOD']) && strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') ? true : false;
			}
			else
			{
				if(isset($_POST[$id]))
				{
					return $filter ? filter_var($_POST[$id],$filter,$filterOptions) : true;
				}
				else
				{
					return false;
				}
			}
		}
42192
public function has($id) {
		if (isset($this->_helpers[$id])) {
			return true;
		}
		
		return $this->loadHelper($id, true);
	}
4780
public function has($id)
    {
        if (array_key_exists($id, $this->entries)) {
            return true;
        }
        if (array_key_exists($id, $this->factories)) {
            return true;
        }
        return false;
    }
755045
def _is_valid_id(self, inpt):
        """"""
        from dlkit.abstract_osid.id.primitives import Id as abc_id
        if isinstance(inpt, abc_id):
            return True
        else:
            return False
16968
public function has($id)
    {
        $id = (string) $id;

        $this->validateName($id);

        return isset($this->items[$id]);
    }
184803
public function validateId($id)
    {
        if (null === $id) {
            throw new \InvalidArgumentException('Category id missing');
        } elseif (!is_numeric($id) || (int)$id != $id) {
            throw new \InvalidArgumentException('Invalid data type for category id');
        }
    }