Sections

Class Phalcon\Mvc\Model\MetaData\Memory

extends abstract class Phalcon\Mvc\Model\MetaData

implements Phalcon\Mvc\Model\MetaDataInterface, Phalcon\Di\InjectionAwareInterface

Source on GitHub

Stores model meta-data in memory. Data will be erased when the request finishes

Constants

integer MODELS_ATTRIBUTES

integer MODELS_PRIMARY_KEY

integer MODELS_NON_PRIMARY_KEY

integer MODELS_NOT_NULL

integer MODELS_DATA_TYPES

integer MODELS_DATA_TYPES_NUMERIC

integer MODELS_DATE_AT

integer MODELS_DATE_IN

integer MODELS_IDENTITY_COLUMN

integer MODELS_DATA_TYPES_BIND

integer MODELS_AUTOMATIC_DEFAULT_INSERT

integer MODELS_AUTOMATIC_DEFAULT_UPDATE

integer MODELS_DEFAULT_VALUES

integer MODELS_EMPTY_STRING_VALUES

integer MODELS_COLUMN_MAP

integer MODELS_REVERSE_COLUMN_MAP

Methods

public __construct ([array $options])

Phalcon\Mvc\Model\MetaData\Memory constructor

public array read (string $key)

Meta verileri zamansal hafıza üzerinden okur

public write (string $key, array $data)

Meta verileri zamansal hafıza üzerine yazar

final protected _initialize (Phalcon\Mvc\ModelInterface $model, mixed $key, mixed $table, mixed $schema) inherited from Phalcon\Mvc\Model\MetaData

Belirli bir tabloya yönelik meta verileri başlatın

public setDI (Phalcon\DiInterface $dependencyInjector) inherited from Phalcon\Mvc\Model\MetaData

DependencyInjector kutusunu ayarlar

public getDI () inherited from Phalcon\Mvc\Model\MetaData

DependencyInjector kutusunu döndürür

public setStrategy (Phalcon\Mvc\Model\MetaData\StrategyInterface $strategy) inherited from Phalcon\Mvc\Model\MetaData

Meta-verisi çıkarma stratejisini ayarlayın

public getStrategy () inherited from Phalcon\Mvc\Model\MetaData

Return the strategy to obtain the meta-data

final public readMetaData (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

Belirli bir modele yönelik meta-verisinin tamamını okur

<?php

print_r(
    $metaData->readMetaData(
        new Robots()
    )
);

final public readMetaDataIndex (Phalcon\Mvc\ModelInterface $model, mixed $index) inherited from Phalcon\Mvc\Model\MetaData

Reads meta-data for certain model

<?php

print_r(
    $metaData->readMetaDataIndex(
        new Robots(),
        0
    )
);

final public writeMetaDataIndex (Phalcon\Mvc\ModelInterface $model, mixed $index, mixed $data) inherited from Phalcon\Mvc\Model\MetaData

Writes meta-data for certain model using a MODEL_* constant

<?php

print_r(
    $metaData->writeMetaDataIndex(
        new Robots(),
        MetaData::MODELS_REVERSE_COLUMN_MAP,
        [
            "leName" => "name",
        ]
    )
);

final public readColumnMap (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

Reads the ordered/reversed column map for certain model

<?php

print_r(
    $metaData->readColumnMap(
        new Robots()
    )
);

final public readColumnMapIndex (Phalcon\Mvc\ModelInterface $model, mixed $index) inherited from Phalcon\Mvc\Model\MetaData

Reads column-map information for certain model using a MODEL_* constant

<?php

print_r(
    $metaData->readColumnMapIndex(
        new Robots(),
        MetaData::MODELS_REVERSE_COLUMN_MAP
    )
);

public getAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

(Alanları) yani tablo nitelikleri isimlerini döndürür

<?php

print_r(
    $metaData->getAttributes(
        new Robots()
    )
);

public getPrimaryKeyAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

Birincil anahtarın sahip olduğu alanlardan meydana gelen bir dizi döndürür

<?php

print_r(
    $metaData->getPrimaryKeyAttributes(
        new Robots()
    )
);

public getNonPrimaryKeyAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

Birincil anahtarda yer almayan alanlardan oluşan bir diziyi geri getirir

<?php

print_r(
    $metaData->getNonPrimaryKeyAttributes(
        new Robots()
    )
);

public getNotNullAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

Geçersiz olmayan niteliklere ait bir dizi döndürür

<?php

print_r(
    $metaData->getNotNullAttributes(
        new Robots()
    )
);

public getDataTypes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

Nitelikleri ve onlara ait veri türlerini döndürür

<?php

print_r(
    $metaData->getDataTypes(
        new Robots()
    )
);

public getDataTypesNumeric (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

Türleri sayısal olan nitelikleri döndürür

<?php

print_r(
    $metaData->getDataTypesNumeric(
        new Robots()
    )
);

public string getIdentityField (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

(Eğer bulunuyorsa) kimlik alanının ismini döndürür

<?php

print_r(
    $metaData->getIdentityField(
        new Robots()
    )
);

public getBindTypes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

Nitelikleri ve bunların sarılmış haldeki veri türlerini döndürür

<?php

print_r(
    $metaData->getBindTypes(
        new Robots()
    )
);

public getAutomaticCreateAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

INSERT SQL nesnesinde görmezden gelinmesi gereken nitelikleri döndürür

<?php

print_r(
    $metaData->getAutomaticCreateAttributes(
        new Robots()
    )
);

public getAutomaticUpdateAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

UPDATE SQL nesnesinde görmezden gelinmesi gereken nitelikleri döndürür

<?php

print_r(
    $metaData->getAutomaticUpdateAttributes(
        new Robots()
    )
);

public setAutomaticCreateAttributes (Phalcon\Mvc\ModelInterface $model, array $attributes) inherited from Phalcon\Mvc\Model\MetaData

INSERT SQL nesnesinde görmezden gelinmesi gereken nitelikleri ayarlayın

<?php

$metaData->setAutomaticCreateAttributes(
    new Robots(),
    [
        "created_at" => true,
    ]
);

public setAutomaticUpdateAttributes (Phalcon\Mvc\ModelInterface $model, array $attributes) inherited from Phalcon\Mvc\Model\MetaData

UPDATE SQL nesnesinden görmezden gelinmesi gereken nitelikleri ayarlayın

<?php

$metaData->setAutomaticUpdateAttributes(
    new Robots(),
    [
        "modified_at" => true,
    ]
);

public setEmptyStringAttributes (Phalcon\Mvc\ModelInterface $model, array $attributes) inherited from Phalcon\Mvc\Model\MetaData

Boş dize değerlerine imkan sağlayan öznitelikleri ayarlayın

<?php

$metaData->setEmptyStringAttributes(
    new Robots(),
    [
        "name" => true,
    ]
);

public getEmptyStringAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

Boş dizelere imkan veren nitelikleri döndürür

<?php

print_r(
    $metaData->getEmptyStringAttributes(
        new Robots()
    )
);

public getDefaultValues (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

(Varsayılan değerlere sahip olan) öz nitelikler ve bunların varsayılan değerlerini döndürür

<?php

print_r(
    $metaData->getDefaultValues(
        new Robots()
    )
);

public getColumnMap (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

Eğer varsa, sütun haritasını döndürür

<?php

print_r(
    $metaData->getColumnMap(
        new Robots()
    )
);

public getReverseColumnMap (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData

Eğer varsa ters sütun haritasını döndürür

<?php

print_r(
    $metaData->getReverseColumnMap(
        new Robots()
    )
);

public hasAttribute (Phalcon\Mvc\ModelInterface $model, mixed $attribute) inherited from Phalcon\Mvc\Model\MetaData

Bir modelin belirli bir özelliğe sahip olup olmadığını test edin

<?php

var_dump(
    $metaData->hasAttribute(
        new Robots(),
        "name"
    )
);

public isEmpty () inherited from Phalcon\Mvc\Model\MetaData

Dahili meta-veri kutusunun boş olup olmadığını kontrol eder

<?php

var_dump(
    $metaData->isEmpty()
);

public reset () inherited from Phalcon\Mvc\Model\MetaData

Yeniden üretebilmek amacıyla dahili meta veriyi sıfırlar

<?php

$metaData->reset();