Exemplo n.º 1
0
function __formenc(Penelope\ObjectSchema $object_schema)
{
    foreach ($object_schema->getProperties() as $property_schema) {
        if (in_array($property_schema->getType(), array('file', 'image'))) {
            __('multipart/form-data');
            return;
        }
    }
    __('application/x-www-form-urlencoded');
}
Exemplo n.º 2
0
 public function __construct(ObjectSchema $object_schema, $id = null, Neo4j\PropertyContainer $client_object = null)
 {
     $this->schema = $object_schema;
     $this->client = $object_schema->getClient();
     if ($client_object) {
         if ($client_object->getId() !== $id) {
             throw new \InvalidArgumentException('IDs do not match.');
         }
         $this->client_object = $client_object;
         $this->id = $id;
     } else {
         if (is_int($id) or ctype_digit($id)) {
             $this->id = (int) $id;
         } else {
             if ($id) {
                 throw new \InvalidArgumentException('Invalid ID.');
             }
         }
     }
 }
Exemplo n.º 3
0
 public function __construct(Neo4j\Client $client, $name, $slug, NodeSchema $start_schema, NodeSchema $end_schema, array $properties = null, array $options = null)
 {
     $this->end_schema = $end_schema;
     $this->start_schema = $start_schema;
     parent::__construct($client, $name, $slug, $properties, $options);
 }