PHP 클래스 Symfony\Component\PropertyAccess\PropertyAccessor

저자: Bernhard Schussek ([email protected])
저자: Kévin Dunglas ([email protected])
저자: Nicolas Grekas ([email protected])
상속: implements Symfony\Component\PropertyAccess\PropertyAccessorInterface
파일 보기 프로젝트 열기: symfony/symfony 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( boolean $magicCall = false, boolean $throwExceptionOnInvalidIndex = false, Psr\Cache\CacheItemPoolInterface $cacheItemPool = null ) Should not be used by application code. Use {@link PropertyAccess::createPropertyAccessor()} instead.
createCache ( string $namespace, integer $defaultLifetime, string $version, Psr\Log\LoggerInterface $logger = null ) : Symfony\Component\Cache\Adapter\AdapterInterface Creates the APCu adapter if applicable.
getValue ( $objectOrArray, $propertyPath )
handleError ( $type, $message, $file, $line, $context )
isReadable ( $objectOrArray, $propertyPath )
isWritable ( $objectOrArray, $propertyPath )
setValue ( &$objectOrArray, $propertyPath, $value )

비공개 메소드들

메소드 설명
camelize ( string $string ) : string Camelizes a given string.
findAdderAndRemover ( ReflectionClass $reflClass, array $singulars ) : array | null Searches for add and remove methods.
getPropertyPath ( string | Symfony\Component\PropertyAccess\PropertyPath $propertyPath ) : Symfony\Component\PropertyAccess\PropertyPath Gets a PropertyPath instance and caches it.
getReadAccessInfo ( string $class, string $property ) : array Guesses how to read the property value.
getWriteAccessInfo ( string $class, string $property, mixed $value ) : array Guesses how to write the property value.
isMethodAccessible ( ReflectionClass $class, string $methodName, integer $parameters ) : boolean Returns whether a method is public and has the number of required parameters.
isPropertyWritable ( object $object, string $property ) : boolean Returns whether a property is writable in the given object.
readIndex ( array $zval, string | integer $index ) : array Reads a key from an array-like structure.
readPropertiesUntil ( array $zval, Symfony\Component\PropertyAccess\PropertyPathInterface $propertyPath, integer $lastIndex, boolean $ignoreInvalidIndices = true ) : array Reads the path from an object up to a given path index.
readProperty ( array $zval, string $property ) : array Reads the a property from an object.
throwInvalidArgumentException ( $message, $trace, $i )
writeCollection ( array $zval, string $property, array | Traversable $collection, string $addMethod, string $removeMethod ) Adjusts a collection-valued property by calling add*() and remove*() methods.
writeIndex ( array $zval, string | integer $index, mixed $value ) Sets the value of an index in a given array-accessible value.
writeProperty ( array $zval, string $property, mixed $value ) Sets the value of a property in the given object.

메소드 상세

__construct() 공개 메소드

Should not be used by application code. Use {@link PropertyAccess::createPropertyAccessor()} instead.
public __construct ( boolean $magicCall = false, boolean $throwExceptionOnInvalidIndex = false, Psr\Cache\CacheItemPoolInterface $cacheItemPool = null )
$magicCall boolean
$throwExceptionOnInvalidIndex boolean
$cacheItemPool Psr\Cache\CacheItemPoolInterface

createCache() 공개 정적인 메소드

Creates the APCu adapter if applicable.
public static createCache ( string $namespace, integer $defaultLifetime, string $version, Psr\Log\LoggerInterface $logger = null ) : Symfony\Component\Cache\Adapter\AdapterInterface
$namespace string
$defaultLifetime integer
$version string
$logger Psr\Log\LoggerInterface
리턴 Symfony\Component\Cache\Adapter\AdapterInterface

getValue() 공개 메소드

public getValue ( $objectOrArray, $propertyPath )

handleError() 공개 정적인 메소드

public static handleError ( $type, $message, $file, $line, $context )

isReadable() 공개 메소드

public isReadable ( $objectOrArray, $propertyPath )

isWritable() 공개 메소드

public isWritable ( $objectOrArray, $propertyPath )

setValue() 공개 메소드

public setValue ( &$objectOrArray, $propertyPath, $value )